//
// Created by Robert Sun on 2024/11/11.
//

#include "key.h"
#include "stdio.h"
void Click_on(uint16_t click){

}
void Click_off(uint16_t click){

}

uint8_t click(){


    if (HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_1) == GPIO_PIN_RESET){
        HAL_Delay(20);
        while (HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_1) == GPIO_PIN_RESET);
        return 1;
    }
    if (HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_11) == GPIO_PIN_RESET){
        HAL_Delay(20);
        while (HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_11) == GPIO_PIN_RESET);
        HAL_Delay(20);
        return 2;
    }

    return 0;
}

